package com.entity;

import java.util.ArrayList;
import java.util.List;

public class FoodExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public FoodExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andFidIsNull() {
            addCriterion("FID is null");
            return (Criteria) this;
        }

        public Criteria andFidIsNotNull() {
            addCriterion("FID is not null");
            return (Criteria) this;
        }

        public Criteria andFidEqualTo(String value) {
            addCriterion("FID =", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidNotEqualTo(String value) {
            addCriterion("FID <>", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidGreaterThan(String value) {
            addCriterion("FID >", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidGreaterThanOrEqualTo(String value) {
            addCriterion("FID >=", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidLessThan(String value) {
            addCriterion("FID <", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidLessThanOrEqualTo(String value) {
            addCriterion("FID <=", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidLike(String value) {
            addCriterion("FID like", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidNotLike(String value) {
            addCriterion("FID not like", value, "fid");
            return (Criteria) this;
        }

        public Criteria andFidIn(List<String> values) {
            addCriterion("FID in", values, "fid");
            return (Criteria) this;
        }

        public Criteria andFidNotIn(List<String> values) {
            addCriterion("FID not in", values, "fid");
            return (Criteria) this;
        }

        public Criteria andFidBetween(String value1, String value2) {
            addCriterion("FID between", value1, value2, "fid");
            return (Criteria) this;
        }

        public Criteria andFidNotBetween(String value1, String value2) {
            addCriterion("FID not between", value1, value2, "fid");
            return (Criteria) this;
        }

        public Criteria andFnameIsNull() {
            addCriterion("FNAME is null");
            return (Criteria) this;
        }

        public Criteria andFnameIsNotNull() {
            addCriterion("FNAME is not null");
            return (Criteria) this;
        }

        public Criteria andFnameEqualTo(String value) {
            addCriterion("FNAME =", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameNotEqualTo(String value) {
            addCriterion("FNAME <>", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameGreaterThan(String value) {
            addCriterion("FNAME >", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameGreaterThanOrEqualTo(String value) {
            addCriterion("FNAME >=", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameLessThan(String value) {
            addCriterion("FNAME <", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameLessThanOrEqualTo(String value) {
            addCriterion("FNAME <=", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameLike(String value) {
            addCriterion("FNAME like", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameNotLike(String value) {
            addCriterion("FNAME not like", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameIn(List<String> values) {
            addCriterion("FNAME in", values, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameNotIn(List<String> values) {
            addCriterion("FNAME not in", values, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameBetween(String value1, String value2) {
            addCriterion("FNAME between", value1, value2, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameNotBetween(String value1, String value2) {
            addCriterion("FNAME not between", value1, value2, "fname");
            return (Criteria) this;
        }

        public Criteria andFpriceIsNull() {
            addCriterion("FPRICE is null");
            return (Criteria) this;
        }

        public Criteria andFpriceIsNotNull() {
            addCriterion("FPRICE is not null");
            return (Criteria) this;
        }

        public Criteria andFpriceEqualTo(Float value) {
            addCriterion("FPRICE =", value, "fprice");
            return (Criteria) this;
        }

        public Criteria andFpriceNotEqualTo(Float value) {
            addCriterion("FPRICE <>", value, "fprice");
            return (Criteria) this;
        }

        public Criteria andFpriceGreaterThan(Float value) {
            addCriterion("FPRICE >", value, "fprice");
            return (Criteria) this;
        }

        public Criteria andFpriceGreaterThanOrEqualTo(Float value) {
            addCriterion("FPRICE >=", value, "fprice");
            return (Criteria) this;
        }

        public Criteria andFpriceLessThan(Float value) {
            addCriterion("FPRICE <", value, "fprice");
            return (Criteria) this;
        }

        public Criteria andFpriceLessThanOrEqualTo(Float value) {
            addCriterion("FPRICE <=", value, "fprice");
            return (Criteria) this;
        }

        public Criteria andFpriceIn(List<Float> values) {
            addCriterion("FPRICE in", values, "fprice");
            return (Criteria) this;
        }

        public Criteria andFpriceNotIn(List<Float> values) {
            addCriterion("FPRICE not in", values, "fprice");
            return (Criteria) this;
        }

        public Criteria andFpriceBetween(Float value1, Float value2) {
            addCriterion("FPRICE between", value1, value2, "fprice");
            return (Criteria) this;
        }

        public Criteria andFpriceNotBetween(Float value1, Float value2) {
            addCriterion("FPRICE not between", value1, value2, "fprice");
            return (Criteria) this;
        }

        public Criteria andFdescIsNull() {
            addCriterion("FDESC is null");
            return (Criteria) this;
        }

        public Criteria andFdescIsNotNull() {
            addCriterion("FDESC is not null");
            return (Criteria) this;
        }

        public Criteria andFdescEqualTo(String value) {
            addCriterion("FDESC =", value, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescNotEqualTo(String value) {
            addCriterion("FDESC <>", value, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescGreaterThan(String value) {
            addCriterion("FDESC >", value, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescGreaterThanOrEqualTo(String value) {
            addCriterion("FDESC >=", value, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescLessThan(String value) {
            addCriterion("FDESC <", value, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescLessThanOrEqualTo(String value) {
            addCriterion("FDESC <=", value, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescLike(String value) {
            addCriterion("FDESC like", value, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescNotLike(String value) {
            addCriterion("FDESC not like", value, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescIn(List<String> values) {
            addCriterion("FDESC in", values, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescNotIn(List<String> values) {
            addCriterion("FDESC not in", values, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescBetween(String value1, String value2) {
            addCriterion("FDESC between", value1, value2, "fdesc");
            return (Criteria) this;
        }

        public Criteria andFdescNotBetween(String value1, String value2) {
            addCriterion("FDESC not between", value1, value2, "fdesc");
            return (Criteria) this;
        }

        public Criteria andCalorieIsNull() {
            addCriterion("CALORIE is null");
            return (Criteria) this;
        }

        public Criteria andCalorieIsNotNull() {
            addCriterion("CALORIE is not null");
            return (Criteria) this;
        }

        public Criteria andCalorieEqualTo(String value) {
            addCriterion("CALORIE =", value, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieNotEqualTo(String value) {
            addCriterion("CALORIE <>", value, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieGreaterThan(String value) {
            addCriterion("CALORIE >", value, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieGreaterThanOrEqualTo(String value) {
            addCriterion("CALORIE >=", value, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieLessThan(String value) {
            addCriterion("CALORIE <", value, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieLessThanOrEqualTo(String value) {
            addCriterion("CALORIE <=", value, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieLike(String value) {
            addCriterion("CALORIE like", value, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieNotLike(String value) {
            addCriterion("CALORIE not like", value, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieIn(List<String> values) {
            addCriterion("CALORIE in", values, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieNotIn(List<String> values) {
            addCriterion("CALORIE not in", values, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieBetween(String value1, String value2) {
            addCriterion("CALORIE between", value1, value2, "calorie");
            return (Criteria) this;
        }

        public Criteria andCalorieNotBetween(String value1, String value2) {
            addCriterion("CALORIE not between", value1, value2, "calorie");
            return (Criteria) this;
        }

        public Criteria andProteinIsNull() {
            addCriterion("PROTEIN is null");
            return (Criteria) this;
        }

        public Criteria andProteinIsNotNull() {
            addCriterion("PROTEIN is not null");
            return (Criteria) this;
        }

        public Criteria andProteinEqualTo(String value) {
            addCriterion("PROTEIN =", value, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinNotEqualTo(String value) {
            addCriterion("PROTEIN <>", value, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinGreaterThan(String value) {
            addCriterion("PROTEIN >", value, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinGreaterThanOrEqualTo(String value) {
            addCriterion("PROTEIN >=", value, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinLessThan(String value) {
            addCriterion("PROTEIN <", value, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinLessThanOrEqualTo(String value) {
            addCriterion("PROTEIN <=", value, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinLike(String value) {
            addCriterion("PROTEIN like", value, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinNotLike(String value) {
            addCriterion("PROTEIN not like", value, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinIn(List<String> values) {
            addCriterion("PROTEIN in", values, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinNotIn(List<String> values) {
            addCriterion("PROTEIN not in", values, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinBetween(String value1, String value2) {
            addCriterion("PROTEIN between", value1, value2, "protein");
            return (Criteria) this;
        }

        public Criteria andProteinNotBetween(String value1, String value2) {
            addCriterion("PROTEIN not between", value1, value2, "protein");
            return (Criteria) this;
        }

        public Criteria andSugarIsNull() {
            addCriterion("SUGAR is null");
            return (Criteria) this;
        }

        public Criteria andSugarIsNotNull() {
            addCriterion("SUGAR is not null");
            return (Criteria) this;
        }

        public Criteria andSugarEqualTo(String value) {
            addCriterion("SUGAR =", value, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarNotEqualTo(String value) {
            addCriterion("SUGAR <>", value, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarGreaterThan(String value) {
            addCriterion("SUGAR >", value, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarGreaterThanOrEqualTo(String value) {
            addCriterion("SUGAR >=", value, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarLessThan(String value) {
            addCriterion("SUGAR <", value, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarLessThanOrEqualTo(String value) {
            addCriterion("SUGAR <=", value, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarLike(String value) {
            addCriterion("SUGAR like", value, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarNotLike(String value) {
            addCriterion("SUGAR not like", value, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarIn(List<String> values) {
            addCriterion("SUGAR in", values, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarNotIn(List<String> values) {
            addCriterion("SUGAR not in", values, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarBetween(String value1, String value2) {
            addCriterion("SUGAR between", value1, value2, "sugar");
            return (Criteria) this;
        }

        public Criteria andSugarNotBetween(String value1, String value2) {
            addCriterion("SUGAR not between", value1, value2, "sugar");
            return (Criteria) this;
        }

        public Criteria andFstateIsNull() {
            addCriterion("FSTATE is null");
            return (Criteria) this;
        }

        public Criteria andFstateIsNotNull() {
            addCriterion("FSTATE is not null");
            return (Criteria) this;
        }

        public Criteria andFstateEqualTo(Integer value) {
            addCriterion("FSTATE =", value, "fstate");
            return (Criteria) this;
        }

        public Criteria andFstateNotEqualTo(Integer value) {
            addCriterion("FSTATE <>", value, "fstate");
            return (Criteria) this;
        }

        public Criteria andFstateGreaterThan(Integer value) {
            addCriterion("FSTATE >", value, "fstate");
            return (Criteria) this;
        }

        public Criteria andFstateGreaterThanOrEqualTo(Integer value) {
            addCriterion("FSTATE >=", value, "fstate");
            return (Criteria) this;
        }

        public Criteria andFstateLessThan(Integer value) {
            addCriterion("FSTATE <", value, "fstate");
            return (Criteria) this;
        }

        public Criteria andFstateLessThanOrEqualTo(Integer value) {
            addCriterion("FSTATE <=", value, "fstate");
            return (Criteria) this;
        }

        public Criteria andFstateIn(List<Integer> values) {
            addCriterion("FSTATE in", values, "fstate");
            return (Criteria) this;
        }

        public Criteria andFstateNotIn(List<Integer> values) {
            addCriterion("FSTATE not in", values, "fstate");
            return (Criteria) this;
        }

        public Criteria andFstateBetween(Integer value1, Integer value2) {
            addCriterion("FSTATE between", value1, value2, "fstate");
            return (Criteria) this;
        }

        public Criteria andFstateNotBetween(Integer value1, Integer value2) {
            addCriterion("FSTATE not between", value1, value2, "fstate");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}